﻿using DreamCMS.BLL;
using DreamCMS.BLL.Common;
using DreamCMS.Entity;
using DreamCMS.WebCore.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;

namespace DreamCMS.Web.Admin
{
    public class AdminPageBase:Page
    {
        protected string IsLoginMessage = string.Empty;
        protected bool IsLogin =false ;
        public AdminPageBase()
        {
            this.IsLogin=LoginHelper.IsRealLogin(ref IsLoginMessage); //检查登陆状态和权限。
            string currentFile=Path.GetFileName(RequestHelper.Path);
            if(currentFile!="login.aspx" && IsLogin==false)
            {
                ServerHelper.RedirectTo("~/admin/login.aspx");
            }
        }

    }
}
